package com.zhh.springcloud.service.impl;

import com.zhh.springcloud.dao.DepartmentDao;
import com.zhh.springcloud.model.Department;
import com.zhh.springcloud.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService{

    @Autowired
    DepartmentDao departmentDao;

    @Override
    public int add(Department department) {
        return departmentDao.add(department);
    }

    @Override
    public int deleteById(int did) {
        return departmentDao.deleteById(did);
    }

    @Override
    public int modifyById(Department department) {
        return departmentDao.modifyById(department);
    }

    @Override
    public List<Department> selectAll() {
        return departmentDao.selectAll();
    }

    @Override
    public Department selectById(int did) {
        return departmentDao.selectById(did);
    }
}
